// #region ForgeEditor
.forge-editor {
    width: 100%;
    height: 100%;
}

.forge-editor-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.forge-editor-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--Colors-Use-Neutral-Border);
    .header-title {
        color: var(--Colors-Use-Neutral-Text-1-Title);
        font-size: 16px;
        font-weight: 600;
        line-height: 24px;
    }

    .header-btn-group {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
    }
}

.forge-editor-body {
    flex: 1;
    width: 100%;
    overflow: hidden;
    display: flex;
}

// ----- editor right -----
.forge-editor-right {
    flex: 1;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--Colors-Use-Neutral-Bg);
}

.right-header {
    padding: 12px 12px 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .header-left {
        display: flex;
        align-items: center;
        .left-title {
            color: var(--Colors-Use-Neutral-Text-1-Title);
            font-size: 12px;
            font-weight: 500;
            line-height: 16px;
        }
    }
    .header-right {
        display: flex;
        align-items: center;
        gap: 8px;
        .switch-wrapper {
            display: flex;
            align-items: center;
            gap: 8px;
            .switch-title {
                color: var(--Colors-Use-Neutral-Text-1-Title);
                font-size: 11px;
                font-weight: 400;
                line-height: 14px;
                letter-spacing: 0.5px;
            }
        }
    }
}

.right-body {
    flex: 1;
    width: 100%;
    overflow: hidden;
}
.right-pane {
    width: 100%;
    height: 100%;
}
.right-pane-hidden {
    display: none;
}

.right-pane-code-and-params {
    border-top: 1px solid var(--Colors-Use-Neutral-Border);
}
// #endregion

// #region AIForgeEditorInfoForm
.ai-forge-editor-info-form {
    min-width: 28px;
    height: 100%;
    overflow: hidden;
    border-right: 1px solid var(--Colors-Use-Neutral-Border);
    background: var(--Colors-Use-Basic-Background);
    display: flex;
    .editor-info-form {
        width: 360px;
        height: 100%;
        opacity: 1;
        transition:
            width 0.2s ease,
            opacity 0.2s ease;
        display: flex;
        flex-direction: column;
    }
    .editor-side-bar {
        width: 0px;
        height: 100%;
        opacity: 0;
        transition:
            width 0.2s ease,
            opacity 0.2s ease;
        display: flex;
        flex-direction: column;
    }
}
.ai-forge-editor-info-hidden {
    .editor-info-form {
        width: 0px;
        opacity: 0;
    }
    .editor-side-bar {
        width: 28px;
        opacity: 1;
    }
}

.editor-info-form-header {
    padding: 8px 12px 4px 12px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    cursor: pointer;
    .expand-btn {
        border-radius: 50%;
    }
    .header-title {
        color: var(--Colors-Use-Neutral-Text-1-Title);
        font-size: 12px;
        font-weight: 600;
        line-height: 16px;
        letter-spacing: 0.5px;
    }
}
.editor-side-bar-header {
    padding: 8px 4px 4px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    .expand-btn {
        border-radius: 50%;
    }
    .header-title {
        text-align: center;
        color: var(--Colors-Use-Neutral-Text-1-Title);
        font-size: 12px;
        font-weight: 500;
        line-height: 16px;
    }
}

.editor-info-form-body {
    flex: 1;
    padding: 8px 12px 12px 12px;
    overflow: hidden auto;
}
.form-container {
    :global {
        .form-item-required {
            margin: 0 4px;
            padding-top: 4px;
            color: var(--Colors-Use-Error-Primary);
            font-size: 14px;
            line-height: 14px;
        }

        .ant-row.ant-form-item {
            gap: 2px;
            .ant-form-item-label {
                padding-bottom: 0;
            }
            .ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
                display: none;
            }
        }
    }

    .item-input {
        :global {
            .ant-input-prefix {
                svg {
                    width: 16px;
                    height: 16px;
                    color: var(--Colors-Use-Neutral-Text-1-Title);
                }
            }
        }
    }
    .item-select {
        :global {
            .ant-select-selector {
                padding-left: 30px !important;
                padding-top: 0 !important;
                padding-bottom: 1px !important;
            }
        }
    }
    .item-select-prefix-icon {
        position: absolute;
        top: 0;
        left: 0;
        width: 37px;
        height: 32px;
        padding-left: 12px;
        padding-right: 8px;
        display: flex;
        align-items: center;
        svg {
            width: 16px;
            height: 16px;
            color: var(--Colors-Use-Neutral-Text-1-Title);
        }
    }
}

.forge-type-select {
    width: 100%;
    :global(.ant-select-selection-item) {
        height: 21px;
        .forge-type-select-option {
            padding: 0;
            align-items: center;
            .description-style {
                display: none;
            }
        }
    }
}
.forge-type-select-dropdown {
    border-radius: 4px;
    border: 1px solid var(--Colors-Use-Neutral-Border);
    background: var(--Colors-Use-Basic-Background);
    box-shadow: 0px 8px 16px 0px rgba(133, 137, 158, 0.1);
}
.forge-type-select-option {
    width: 100%;
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    .header-icon {
        width: 16px;
        svg {
            width: 16px;
            height: 16px;
        }
    }
    .type-content {
        flex: 1;
        overflow: hidden;
        font-size: 12px;
        line-height: 16px;
        color: var(--Colors-Use-Neutral-Text-1-Title);
        font-style: normal;
        font-weight: 600;
    }
}
// #endregion

// #region PromptAndActiveTextarea
.prompt-and-action-textarea {
    padding: 4px 12px 6px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: 4px 4px 0 0;
    background: var(--Colors-Use-Basic-Background);
    .textarea-header {
        display: flex;
        align-items: center;
        gap: 4px;
        .header-title {
            color: var(--Colors-Use-Neutral-Text-4-Help-text);
            font-size: 12px;
            font-weight: 400;
            line-height: 16px;
            letter-spacing: 0.5px;
        }
        .header-hint-icon {
            cursor: pointer;
            svg {
                width: 16px;
                height: 16px;
                color: var(--Colors-Use-Neutral-Text-4-Help-text);
            }
        }
    }
    .textarea-body {
        max-height: 120px !important;
    }
}

.prompt-and-action-textarea-focus {
    background: var(--Colors-Use-Neutral-Bg-Hover);
    border-bottom: 1.5px solid var(--Colors-Use-Main-Primary);
}

.textarea-hint-icon-tooltip {
    padding-bottom: 2px;
}
// #endregion

// #region AIForgeEditorPromptAndAction
.ai-forge-editor-prompt-and-action {
    height: 100%;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden auto;
}
// #endregion

// #region AIForgeEditorCodeAndParams
.ai-forge-editor-code-and-params {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
}
.editor-code-wrapper {
    flex: 1;
    overflow: hidden;
}
.editor-params-preview-wrapper {
    width: 301px;
    height: 100%;
    border-left: 1px solid var(--Colors-Use-Neutral-Border);
    background: var(--Colors-Use-Basic-Background);
    display: flex;
    flex-direction: column;

    .params-preview-header {
        padding: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .header-title {
            color: var(--Colors-Use-Neutral-Text-1-Title);
            font-size: 12px;
            font-weight: 500;
            line-height: 16px;
        }

        .header-extra {
            display: flex;
            justify-content: flex-end;
            align-items: center;
        }
    }
    .params-preview-container {
        flex: 1;
        overflow: hidden auto;

        :global {
            .ant-form-item-label > label {
                font-size: 12px;
            }
        }

        .custom-params-wrapper {
            padding: 0 12px;
        }
        .optional-params-wrapper {
            padding: 0 12px;
        }
        .additional-params-divider {
            margin: 16px 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 4px;
            .text-style {
                color: var(--Colors-Use-Neutral-Disable);
                font-size: 12px;
                font-weight: 600;
                line-height: 16px;
            }
            .divider-style {
                flex: 1;
                overflow: hidden;
                height: 1px;
                border-top: 1px dashed var(--Colors-Use-Neutral-Border);
            }
        }

        .to-end {
            text-align: center;
            color: var(--Colors-Use-Neutral-Disable);
            font-size: 11px;
            padding-top: 24px;
            padding-bottom: 24px;
        }
    }
}
// #endregion